Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream/field name validation/filtering #1004

Merged
merged 8 commits into from
Nov 18, 2020
Merged

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Nov 17, 2020

Resolves #954
Resolves #972

Start at CatalogHelpers.java.

Might need to address any discovery failures for existing API sources if they fail on integration tests here.

Copy link
Contributor

@cgardens cgardens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Can you add a page in our docs that explains the rules: 1. describes the allowed pattern 2. that we fail in discover 3. that we filter in sync? you can do as separate PR if you prefer, but i don't want us to forget to document this!


if (!invalidStreamNames.isEmpty()) {
invalidStreamNames.forEach(streamName -> LOGGER.error("Cannot sync invalid stream name: " + streamName));
return new OutputAndStatus<>(JobStatus.FAILED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also return a message describing why discovery failed so we can show this on the UI?

Copy link
Contributor Author

@jrhizor jrhizor Nov 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OutputAndStatus doesn't allow for error messages unfortunately. Adding messages outside of logs seems a bit out of scope for this PR. Added #1011

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that, but I'm just worried that in its current state, there is no way for the user to know what's wrong. It'll just look like airbyte is broken if e.g: they sync Gsheets with a space in the name, and all they'll see on the UI is "an error happened"

@@ -0,0 +1,13 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a test with Unicode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@jrhizor jrhizor merged commit bd14fff into master Nov 18, 2020
@jrhizor jrhizor deleted the jrhizor/stream-validation branch November 18, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants